package ch.unisi.inf.tagging;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

import javax.imageio.ImageIO;

import ch.unisi.inf.engine.Image;

public class Tagging {
	
	ArrayList<Image> tag;
	private Image image;
	
	public Tagging(Image image, ArrayList<Image> tag){
		
		tag = new ArrayList<Image>();
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/desktop.jpg")); 
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/simone.jpg")); 
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/simone.jpg")); 
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/simone.jpg"));
		tag.add(loadImage("src/images/simone.jpg")); 
		tag.add(loadImage("src/images/simone.jpg"));
		
		
		
		
		
	}
	
	
	public static Image loadImage(String imagePath){
		 File file = new File(imagePath);
	        try {
	            BufferedImage image = ImageIO.read(file);
	            if(image == null || (image.getWidth(null) < 0)) {
	                return null;
	            }
	            return new Image(imagePath.toString(), image);
	        }
	        catch(IOException exc) {
	            return null;
	        }
	    }

}
